<!DOCTYPE html>
<html>
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>微驾校 后台主题UI框架 - 登录</title>
    <meta name="keywords" content="微驾校后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="微驾校是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">
	{include file='public/header'/}
</head>

<body class="gray-bg">

    <div class="middle-box text-center loginscreen  animated fadeInDown">
        <div>
            <div>

                <h1 class="logo-name">JX</h1>

            </div>
            <h3>欢迎使用 微驾校</h3>

            <form class="m-t" role="form" method="post" action="###">
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="手机号" name="telphone" required="">
                </div>
                <div class="form-group">
                    <input type="password" class="form-control" placeholder="密码" name="password" required="">
                </div>
                <button type="submit" class="btn btn-primary block full-width m-b">登 录</button>


                <p class="text-muted text-center">  <a href="{:url('member/register',['role'=>0])}">注册一个新账号</a>
                </p>

            </form>
        </div>
    </div>
    <script src="/static/js/jquery.min.js?v=2.1.4"></script>
    <script src="/static/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="/static/js/plugins/layer/layer.min.js"></script>
    <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
    <script type="text/javascript">
    $(function(){
    	$(".m-t").submit(function(){
    		var telphone = $("input[name='telphone']").val();
    		var telReg = /1[3|5|7|8]\d{9}/;
    		if(!telReg.test(telphone)){
    			layer.alert("请输入正确的手机号！",function(i){
    				layer.close(i);
    			});
    			return false;
    		}
    		var password = $("input[name='password']").val();
    		if(password==""){
    			layer.alert("密码为空！",function(i){
    				layer.close(i);
    			});
    			return false;
    		}
    		
    		var data = $(".m-t").serialize();
    		$.ajax({
    			url:"{:url('member/login')}",
    			data:data,
    			type:"POST",
    			success:function(data){
    				data = JSON.parse(data);
    				console.log(data);
    				layer.alert(data.msg,function(i){
    					layer.close(i);
    					if(data.code==0){
    						location.href=data.url;
    					}
    				});
    			},
    			error:function(err){
    				layer.alert("未知错误".err,function(i){
    					layer.close(i);
    				});
    			}
    		});
    		return false;
    	});
    });
    </script>
</body>


<!-- Mirrored from www.zi-han.net/theme/hplus/login.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:18:23 GMT -->
</html>
